The present invention relates to protocols (i.e., sets of rules) for the communication of digital data between a sender and receiver (e.g., the sender and receiver are computer systems located at different physical locations).
The usual form of digital data communication involves sending such digital data in the form of datagrams over a network. See, e.g., Computer Networks by Andrew S. Tanenbaum, Prentice-Hall Inc., Englewood Cliffs, N.J. 1981. A datagram is a group of bits representing a portion of the digital data to be transmitted and each datagram is treated individually by the network. Thus, if a large amount of data is to be transmitted from a sender data processing unit to a receiver data processing unit, the sender data processing unit breaks up the large amount of data into smaller sized blocks (called data records hereinbelow) and packs these records into datagrams for transmission over a data communications network to the receiver data processing unit. The datagrams which are being sent over the network range in size from 1 to some fixed number (say n) bytes. The data records which are to be packed into the datagrams also may range in size from 1 to some other fixed number (say m) bytes.
Whenever a datagram is sent over the network, there are various overheads associated with such transmission. Firstly, it takes time to process each datagram at the sending and receiving ends. This time is split into two components: a fixed amount per each datagram and an amount proportional to the size of the datagram. The fixed amount is usually significantly greater than the variable amount. Secondly, each datagram must have extra data associated with it (address information etc.) which involves a fixed amount of extra data to be added to each datagram. Due to such overheads, it is therefore inefficient to send small datagrams over the network.
The usual technique for packing data records into datagrams involves taking the data records in sequential order. For example, a list of variable length data records of lengths 200 bytes, 250 bytes, 100 bytes and 50 bytes are to be packed into a plurality of 512-byte datagrams. The first two records can be packed into the first datagram (because 200 bytes plus 250 bytes will fit in a 512 byte datagram). However, the next data record (of 100 bytes) will not fit (because 450 plus 100 will be greater than the 512 byte capacity of a datagram). Thus, the 100 byte record will have to be packed into the next datagram.
The problem with this prior technique, however, is that there is some space left over in the first datagram which has not been utilized. Thus, the overheads discussed above are incurred without obtaining as much data transmission as would otherwise be possible. Further, when certain communications networks are used, such as mobile networks, transmission time can be very expensive, so it is highly advantageous to flow as few datagrams as possible over the network with as much data as possible packed into each datagram. Thus, the present state of the art in this area results in an inefficient and potentially very expensive systems architecture.
According to a first aspect, the invention provides a data communications apparatus connected to a network through which datagrams flow from the data communications apparatus to at least one other data communications apparatus also connected to the network, the apparatus having: a means for receiving data which is to be transmitted over the network, such data being broken up into data records; and a means for packing the data records into datagrams for transmission over the network, including a means for assigning data records to datagrams; wherein the means for packing takes the data records out of sequential order when assigning data records to datagrams.
Preferably, the means for packing assigns, to a datagram presently being packed, the largest unassigned data record that will fit in the datagram.
Preferably, the means for assigning considers only one datagram at a time when assigning data records to datagrams. However, alternatively, the means for assigning considers a plurality of datagrams at a time when assigning data records to datagrams.
Preferably, the size of each data record must be less than or equal to the size of each datagram. However, alternatively, the size of a data record is larger than the size of a datagram.
According to a second aspect, the invention provides a method of carrying out the functions recited with respect to the first aspect.
According to a third aspect, the invention provides a computer program product stored on a computer readable storage medium, for when running on a computing system, carrying out the functions recited with respect to the first aspect of the invention.
Thus, by taking data records out of sequential order when assigning data records to datagrams and thereby packing as much data as possible into each datagram before transmission, a highly efficient use of the communications overhead is possible. This presents a very large cost savings, especially where the network is a wireless one, where it is expensive (as compared to wired networks) to transmit each datagram.